
package com.idealighter.game.roomcard.games.mustniuniu.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.roomcard.games.mustniuniu.bo.TrusteeBo;
import com.idealighter.game.roomcard.games.mustniuniu.convert.TrusteeBoConvert;
import com.idealighter.game.roomcard.games.mustniuniu.manager.MustNiuNiuMgr;
import com.idealighter.game.roomcard.games.mustniuniu.message.ReqTrusteeMsg;
import com.idealighter.game.server.handler.ReqMessageHandler;


@ReqMsgHandler(ModuleMsgIdConstant.MustNiuNiu.TRUSTEE)
public class ReqTrusteeHandler implements ReqMessageHandler {
  @Inject
  private MustNiuNiuMgr mstnnMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqTrusteeMsg msg = (ReqTrusteeMsg) message;
    TrusteeBo trusteeBo = TrusteeBoConvert.INSTANCE.msg2bo(msg);
    return mstnnMgr.trustee(player, trusteeBo);
  }
}
